/*    */ package nc.bs.ic.m45.delete;
/*    */ 
/*    */ import java.io.Serializable;
/*    */ import java.util.HashMap;
/*    */ import java.util.Map;
/*    */ import nc.bs.ic.general.delete.DeleteBPTemplate;
/*    */ import nc.bs.ic.general.delete.IDeleteBP;
/*    */ import nc.bs.ic.general.delete.rule.FillLocRule;
/*    */ import nc.bs.ic.m45.base.BPPlugInPoint;
/*    */ import nc.bs.ic.m45.delete.rule.DelReWritePIM;
/*    */ import nc.bs.ic.m45.delete.rule.DeleteRewriteITRule;
/*    */ import nc.bs.ic.m45.delete.rule.DeleteRewritePORule;
/*    */ import nc.bs.ic.m45.delete.rule.Rewrite4CCoopFlag;
/*    */ import nc.bs.ic.pub.base.ICAroundProcesser;
/*    */ import nc.bs.ic.pub.base.IDeleteRuleProvider;
/*    */ import nc.bs.ic.pub.util.SagasUtils;
/*    */ import nc.bs.scmpub.rule.VOSagaFrozenValidateRule;
/*    */ import nc.impl.pubapp.pattern.rule.processer.AroundProcesser;
/*    */ import nc.vo.ic.general.define.ICBillVO;
/*    */ import nc.vo.ic.m45.entity.PurchaseInVO;
/*    */ import nc.vo.ic.pub.util.VOEntityUtil;
/*    */ import nc.vo.scmpub.res.billtype.ICBillType;
/*    */ import nccloud.bs.ic.mobile.inbound.operation.rewrite.MobAfterPurchaseInDelete;
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ public class DeleteBP
/*    */   extends Object
/*    */   implements IDeleteBP<PurchaseInVO>, IDeleteRuleProvider<PurchaseInVO>
/*    */ {
/*    */   public void addAfterRule(PurchaseInVO[] vos, AroundProcesser<PurchaseInVO> processor) {
/* 38 */     ((ICAroundProcesser)processor).addAfterRuleAt(new FillLocRule(), nc.bs.ic.general.delete.rule.after.LocationDeleteAfterBillDelete.class);
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */     
/* 45 */     ((ICAroundProcesser)processor).addAfterRuleAt(new DeleteRewritePORule(), nc.bs.ic.general.rule.after.AtpAfterUpdate.class);
/* 46 */     processor.addAfterRule(new DeleteRewriteITRule());
/* 47 */     processor.addAfterRule(new DelReWritePIM());
/*    */     
/* 49 */     processor.addAfterRule(new Rewrite4CCoopFlag());
/* 50 */     processor.addAfterRule(new MobAfterPurchaseInDelete());
/*    */   }
/*    */ 
/*    */ 
/*    */ 
/*    */   
/* 56 */   public void addBeforeRule(PurchaseInVO[] vos, AroundProcesser<PurchaseInVO> processor) { processor.addBeforeRule(new VOSagaFrozenValidateRule(true)); }
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */   
/*    */   public void delete(PurchaseInVO[] vos) {
/* 65 */     DeleteBPTemplate<PurchaseInVO> delBP = new DeleteBPTemplate<PurchaseInVO>(BPPlugInPoint.DeleteBP, this);
/* 66 */     SagasUtils.frozenAndAddSaga(vos, ICBillType.PurchaseIn.getCode(), "1", null);
/* 67 */     Map<String, Serializable> paramMap = new HashMap<String, Serializable>();
/* 68 */     paramMap.put("actionname", "delete_45");
/* 69 */     paramMap.put("hid", VOEntityUtil.getPksFromAggVO(vos));
/* 70 */     SagasUtils.compensate(paramMap, nc.itf.ic.m45.compensate.IPurchaseInSagasCompensate.class);
/* 71 */     delBP.delete(vos);
/*    */   }
/*    */ }


/* Location:              E:\zhuhai_ncc\NCC2111\modules\ic\META-INF\lib\ic_inbound.jar!/nc/bs/ic/m45/delete/DeleteBP.class
 * Java compiler version: 8 (52.0)
 * JD-Core Version:       1.0.7
 */